<template>
    <div>
        <el-menu active-text-color="#ff8989" background-color="#e0ffff" class="el-menu-vertical-demo" default-active="2"
            text-color="#8989ff" router>
            <!-- 员工管理 -->
            <el-sub-menu index="1" v-if="this.adminInfo != null">
                <template #title>
                    <el-icon><span class="iconfont icon-setEmployees"></span></el-icon>
                    <span>员工管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/emp">
                        <el-icon><span class="iconfont icon-Employees"></span></el-icon>
                        员工列表
                    </el-menu-item>
                    <el-menu-item index="/addemp">
                        <el-icon><span class="iconfont icon-addEmp"></span></el-icon>
                        添加员工
                    </el-menu-item>
                </el-menu-item-group>
            </el-sub-menu>
            <!-- 商家管理 -->
            <el-sub-menu index="2" v-if="this.adminInfo != null">
                <template #title>
                    <el-icon><span class="iconfont icon-shangjialiebiao"></span></el-icon>
                    <span>商家管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/bus">
                        <el-icon><span class="iconfont icon-shangjiaxinxi"></span></el-icon>
                        商家列表
                    </el-menu-item>
                    <el-menu-item index="/busRegist">
                        <el-icon><span class="iconfont icon-guanggaozhuhuodongtuiguang"></span></el-icon>
                        商家注册
                    </el-menu-item>
                    <el-menu-item index="/auditShop">
                        <el-icon><span class="iconfont icon-guanggaozhuhuodongtuiguang"></span></el-icon>
                        店铺审核
                    </el-menu-item>
                </el-menu-item-group>
            </el-sub-menu>
            <!-- 菜品管理 -->
            <el-sub-menu index="3" v-if="this.businessInfo != null">
                <template #title>
                    <el-icon><span class="iconfont icon-Stockholm-icons---Food---Dinner"></span></el-icon>
                    <span>菜品管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/foodType">
                        <el-icon><span class="iconfont icon-caipindalei"></span></el-icon>
                        菜品分类
                    </el-menu-item>
                    <el-menu-item index="/food">
                        <el-icon><span class="iconfont icon-navicon-cpjh"></span></el-icon>
                        菜品列表
                    </el-menu-item>
                </el-menu-item-group>
            </el-sub-menu>
            <!-- 店铺管理 -->
            <el-sub-menu index="5" v-if="this.businessInfo != null">
                <template #title>
                    <el-icon><span class="iconfont icon-dianpu1"></span></el-icon>
                    <span>店铺管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/shop">
                        <el-icon><span class="iconfont icon-shangjialiebiao1"></span></el-icon>
                        店铺列表
                    </el-menu-item>
                    <el-menu-item index="/classifyshop">
                        <el-icon><span class="iconfont icon-dianpu"></span></el-icon>
                        店铺分类
                    </el-menu-item>
                    <el-menu-item index="/addshop">
                        <el-icon><span class="iconfont icon-zhuceshangjialiebiao"></span></el-icon>
                        添加店铺
                    </el-menu-item>
                </el-menu-item-group>
            </el-sub-menu>
            <!-- 系统设置 -->
            <!-- <el-sub-menu index="6">
                <template #title>
                    <el-icon><span class="iconfont icon-Setting"></span></el-icon>
                    <span>系统设置</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="3-1">
                        <el-icon><span class="iconfont icon-Employees"></span></el-icon>
                        轮播图管理
                    </el-menu-item>
                    <el-menu-item index="3-2">
                        <el-icon><span class="iconfont icon-addEmp"></span></el-icon>
                        快捷菜单管理
                    </el-menu-item>
                    <el-menu-item index="3-3">
                        <el-icon><span class="iconfont icon-addEmp"></span></el-icon>
                        首页推荐商家
                    </el-menu-item>
                    <el-menu-item index="3-3">
                        <el-icon><span class="iconfont icon-addEmp"></span></el-icon>
                        首页推荐菜品
                    </el-menu-item>
                    <el-menu-item index="3-3">
                        <el-icon><span class="iconfont icon-addEmp"></span></el-icon>
                        首页热销推荐
                    </el-menu-item>
                </el-menu-item-group>
            </el-sub-menu> -->
        </el-menu>
    </div>
</template>

<script>
export default {
    data() {
        return {
            // 定义变量用来存储，获取本地存储的数据
            businessInfo: {},
            // 定义变量用来存储，获取本地存储的数据
            adminInfo: {},
        }
    },
    methods: {
    },
    created() {
        let info = sessionStorage.getItem("business");
        let info1 = sessionStorage.getItem("admin");
        this.adminInfo = JSON.parse(info1);
        this.businessInfo = JSON.parse(info);
        

    }
}
</script>

<style scoped></style>